#pragma once
#include "ServerProxy.h"

#ifndef _CENTER_PROXY_H_
#define _CENTER_PROXY_H_

class CCenterProxy	: public CServerProxy
{
public:
	CCenterProxy(void);
	~CCenterProxy(void);
	operator net::network_t()const{ return mLink; }
	XGC_INLINE net::network_t GetLink(){ return mLink; }

protected:
	virtual xgc_void RegisteMessage();
	virtual xgc_lpvoid OnConnect( net::network_t h, xgc_lpvoid p );
	virtual xgc_void OnClose( xgc_lpvoid userdata );

private:
	xgc_void ProcessLoginRpn( net::network_t h, xgc_lpvoid u, const xgc_byte* data, xgc_size size );
	xgc_void UserSessionRes( net::network_t h, xgc_lpvoid u, const xgc_byte* data, xgc_size size );
private:
	event mConfigEvent;
	net::network_t mLink;
};

#endif // _CENTER_PROXY_H_